import React, { useState, useEffect } from 'react'
import './SystemManage.less'
import {  Tag } from 'antd';
import axiosEL from '../../../utils/request'
import { useNavigate } from "react-router-dom";


export default function SystemManage() {

  const navigate=useNavigate()


  // 居民详情
  const [userDetail, setUserDetail] = useState<any>()
  // 获取 签约居民详情
  const getUserData = async () => {
    //cf94d0f0-49dd-11ed-9052-1525a776da32 residentId
    // let residentId='cf94d0f0-49dd-11ed-9052-1525a776da32'
    let residentId='67e98bc0-ee1b-11ed-8459-ab11227ca877'
    let res = await axiosEL.post('/api/getResidentLabelHealthById', { residentId: residentId })
    console.log(res, '居民详情');
    if (res.code == 200) {
      // setUserDetail(res.data)
    }



  }

  useEffect(() => {
    getUserData() //获取 签约居民详情
  }, [])


  return (
    <div className='box'>
      <div className='top'>
        <span></span>
        完善档案信息
      </div>

      <div className='tbox'>
        <p>居民信息</p>
        <div className='oneRow'>
          <div>
            <span className='title'>居民编号</span>
            <span >20200908900</span>
          </div>
          <div>
            <span className='title'>姓名</span>
            <span >白素</span>
          </div>
          <div className='pic'>
            <span className='title'>头像</span>
            <span >
            <img  src="http://101.34.108.131:3000/public/upload/9169289e8399cc37f372b1ef3ac6d357.jpeg" alt="" />
            </span>
          </div>
          <div>
            <span className='title'>身份证号</span>
            <span >371456198908090543</span>
          </div>

        </div>
        <div className='oneRow '>
          <div>
            <span className='title'>手机号码</span>
            <span >18864308600</span>
          </div>
          <div style={{width:'320px'}}>
            <span className='title' >现居地</span>
            <span style={{width:'260px'}}>怀柔区洛西县建设路青莲小区6-601</span>
          </div>
          <div>
            <span className='title'>登陆密码</span>
            <span >ha138900</span>
          </div>
          <div>
            <span className='title'>行政区划</span>
            <span >青莲居委会</span>
          </div>

        </div>

        <div className='oneRow'>
          <div >
            <span className='title'>居民标签</span>
               <Tag color="magenta" >高血压</Tag>
               <Tag color="magenta" >冠心病</Tag>

          </div>

          <div>
            <span className='title'>性别</span>
            <span >女</span>
          </div>
          <div>
            <span className='title'>出生日期</span>
            <span >1970-09-08</span>
          </div>
          <div>
            <span className='title'>籍贯</span>
            <span >北京</span>
          </div>

        </div>
        <div className='oneRow '>
          <div>
            <span className='title'>民族</span>
            <span >汉族</span>
          </div>
          <div>
            <span className='title'>文化程度</span>
            <span >本科</span>
          </div>
          <div>
            <span className='title'>婚姻状况</span>
            <span >已婚</span>
          </div>
          <div>
            <span className='title'>职业</span>
            <span >公务员</span>
          </div>

        </div>
        <div className='oneRow oneRow1'>
          <div>
            <span className='title'>工作单位</span>
            <span >无</span>
          </div>
          <div>
            <span className='title'>紧急联系人</span>
            <span >无</span>
          </div>
          <div>
            <span className='title'>联系人电话</span>
            <span >无</span>
          </div>
          <div>
            <span className='title'>户籍类型</span>
            <span >城镇</span>
          </div>

        </div>
        <div className='oneRow oneRow1'>
          <div>
            <span className='title'>费用类型</span>
            <span >自费</span>
          </div>
          <div >
            <span style={{ width: 100 }} className='title'>定点医疗单位</span>
            <span >怀柔区第一人民医院</span>
          </div>
          <div>
            <span className='title'>来源</span>
            <span >用户注册</span>
          </div>

        </div>


      </div>

      <div className='bbox'>
        <p>健康信息</p>
        <div className='oneRow'>
          <div>
            <span className='title'>身高</span>
            <span >169cm</span>
          </div>
          <div>
            <span className='title'>体重</span>
            <span >49kg</span>

          </div>
          <div>
            <span className='title'>血型</span>
            <span >A型</span>
          </div>
          <div>
            <span className='title'>RH阴性</span>
            <span >否</span>
          </div>
        </div>
        <div className='oneRow'>
          <div>
            <span className='title'>过敏史</span>
            <span >无</span>
          </div>
          <div>
            <span className='title'>既往史</span>
            <span >无</span>
          </div>
          <div>
            <span className='title'>就诊史</span>
            <span >无</span>
          </div>
          <div>
            <span className='title'>家族病史</span>
            <span >无</span>
          </div>
        </div>



      </div>
      <div className='box2'>
        <p>家庭成员</p>
        <div className='family'>
          {/* <span className='title'>家庭成员</span> */}
          <div className='one'>
            <img src="https://cdn7.axureshop.com/demo/1881228/images/%E5%BE%85%E5%AE%A1%E6%A0%B8%E7%AD%BE%E7%BA%A6%E8%AF%A6%E6%83%85/u1575.jpg" alt="" />
            <div className='oneright'>
              <div className='rtop'>
                <span >李青</span>
                <span className='age'>58岁</span>
                <img src="https://cdn7.axureshop.com/demo/1881228/images/%E5%BE%85%E5%AE%A1%E6%A0%B8%E7%AD%BE%E7%BA%A6%E8%AF%A6%E6%83%85/u1576.png" alt="" />
              </div>
              <p>关系:&nbsp;父母</p>
            </div>
          </div>
          <div className='one'>
            <img src="https://cdn7.axureshop.com/demo/1881228/images/%E5%BE%85%E5%AE%A1%E6%A0%B8%E7%AD%BE%E7%BA%A6%E8%AF%A6%E6%83%85/u1575.jpg" alt="" />
            <div className='oneright'>
              <div className='rtop'>
                <span >王林</span>
                <span className='age'>28岁</span>
                <img src="https://cdn7.axureshop.com/demo/1881228/images/%E5%BE%85%E5%AE%A1%E6%A0%B8%E7%AD%BE%E7%BA%A6%E8%AF%A6%E6%83%85/u1576.png" alt="" />
              </div>
              <p>关系:&nbsp;夫妻</p>
            </div>
          </div>
        </div>
      </div>

      <div className='foot'>
      <button className='edit' style={{ cursor: 'pointer' }} onClick={()=>{navigate("/manage/msgPeople")}}>编辑档案信息</button>
      <button className='back' style={{ cursor: 'pointer' }} onClick={() => navigate(-1)}>返回</button>
      </div>
    </div>
  )
}

